const crypto = require('crypto');
const salt = 'TAO_MALL';

function getMd5() {
    return crypto.createHash('md5');
}

function encode(str) {
    const result = getMd5().update(salt + str, 'utf-8');
    return result.digest('hex').toUpperCase();
}

module.exports = {
    encode
}